Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Mono.Cecil Type Forwarding #68

Closed
wants to merge 2 commits into from

Conversation

Aragas
Copy link
Contributor

@Aragas Aragas commented Mar 2, 2023

This is just a copy-paste of BepinEx type forwarding, it works as expected.
The forwarding is only added to .NET Framework, as .NET Standard is not supported by Harmony and on .NET (Core) the dependencies are external.
Fixes #67

@Aragas
Copy link
Contributor Author

Aragas commented Mar 8, 2023

Hello again! Could this be reviewed in the nearest future?
This is a blocker for our HarmonyX switch in Bannerlord!
As a workaround, we might potentially fork it and wait for the PR/Issue resolution in the standard manner, but worst case we'll use this PR as a solution and we'll distribute a compiled HarmonyX based on the PR as the replacement of the vanilla Harmony!

@ManlyMarco ManlyMarco assigned ghorsington and unassigned ghorsington Mar 8, 2023
@ManlyMarco ManlyMarco requested a review from ghorsington March 8, 2023 21:52
@Aragas
Copy link
Contributor Author

Aragas commented Mar 16, 2023

We forked HarmonyX and use that fork for now. We do hope that we can switch to the main HarmonyX later!

Added net472 to redirect Mono.Cecil.GenericParameterConstraint
Updated MonoMod.RuntimeDetour to be the same as Harmony v2.2.2
@Aragas Aragas force-pushed the mono-cecil-forwarding branch from c50f279 to 6aedda2 Compare March 16, 2023 13:37
@ManlyMarco
Copy link
Member

Unless one of the other devs rules otherwise, this is unlikely to get merged since it's a pretty niche use case (I don't think I've seen this issue pop up anywhere else). I suggest approaching the issue like we do in BepInEx and shim the assemblies as necessary.

@Aragas
Copy link
Contributor Author

Aragas commented Aug 29, 2023

Unless one of the other devs rules otherwise, this is unlikely to get merged since it's a pretty niche use case (I don't think I've seen this issue pop up anywhere else). I suggest approaching the issue like we do in BepInEx and shim the assemblies as necessary.

Shimming means that we modify the assemblies in the FS, introducing persistent modifications to files, which can introduce a new set of issues

@ManlyMarco
Copy link
Member

ManlyMarco commented Aug 30, 2023

If you absolutely can't modify the FS you can just load the modified assemblies from memory. It will require shimming to happen on every game start though.

@ManlyMarco
Copy link
Member

Closing since there's no interest.

@ManlyMarco ManlyMarco closed this Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leaking Mono.Cecil.* types from the vanilla Harmony
3 participants